Okay.
So in this video, we're going to be taking a look at particle emitters.
And as you would guess, they allow you to emit particles from parts.
So I'll show you how to use them here real quick.
I have my part that we got from our last lecture, and I can add an object in here, which is a particle
emitter.
And you should immediately see that our part is emitting particles.
Very cool.
And there's a bunch of properties in here that we can change.
We can change the color, the light emission, the size, a whole bunch of stuff We're going to go through
every single one.
So first off, obviously you can change the color of your particles like maybe I want mine to be, Oh,
I don't know.
How about some red particles?
There we go.
We've got some red color particles.
And of course, you can press these three dots here and actually animate over time what colors you want
the particles to be.
So maybe I want them to start off as red and later down the line in the lifetime of the particle.
Maybe I want it to be more orange.
Yellow, like some like that.
So now you can see that my particles slowly throughout their lifetime are fading to become more of this
orange color.
The next thing here is light emission, and this is basically how the particles blend with other colors
in your game.
So I could set it to like ten, even though the max number for this is one, it'll still work the same.
I can't really tell what color they are, so I usually just leave this off for now.
Light influence is basically how you want your particles to be influenced by the lighting in your game.
So for example, if these particles were like in a very dark area of your game and this light influences
that one, you basically wouldn't be able to see the particles because it's too dark.
But if you leave it at zero, then the particles aren't affected by lighting your game at all.
They will always look like this no matter what light setting your particles are in in your game.
The next one here is orientation, and this is basically how you want your particles to look.
So right now it's facing the camera.
Meaning if I move around this object, you see all the particles follow my camera.
So they're always looking at me.
But I can change it to maybe like facing camera world up.
And basically what this does, it stops the particles from rotating horizontally.
So as you can see, they're stuck like that.
But if I put it back on facing camera, you see they still rotate with my camera even if I look down.
Velocity parallel is pretty similar to facing camera rolled up, but they follow the velocity.
So if I were to shoot out the particles from the side, they'd do the same effect but sideways and then
velocity perpendicular.
They yeah, they do that instead of being parallel, they're not perpendicular to the part that they're
shooting out of.
So that's kind of interesting.
The next simple property is size, of course, so I can change the size.
Maybe I want the particle to be like, Yeah, huge, huge particles.
Or maybe I want them to be really tiny.
I can just sit here and punch in some numbers to change the size of the particles.
Easy as that.
And of course, you can also adjust them over the lifetime.
So maybe at the beginning I want them to be super large and then over time they shrink smaller and smaller.
And I can click on this line to add extra points where I want to animate.
So maybe I want to do something like this.
I don't know.
See how that looks.
So they get small and they get big again, and then they get small and then they get big.
So that's basically how this works.
I'll just set it to one for now.
Squash is an interesting one.
It's basically how much you want them to be horizontally squashed.
So I'll show an example here.
If I set it to one, you see our particles got squashed horizontally and it can continue to squash them
more and more.
I'm not exactly sure what you want to use this for, but it's there if you want to use it.
The next one here is texture, and this allows you to change the image of your particles.
But if your game is published, you can actually add your own images in here and add whatever you like.
But I'm just going to leave it at the default for now.
Transparency.
Pretty simple.
One is fully transparent, can't see them point five, halfway transparent and zero.
There is no transparency.
The offset is basically the distance away.
Or how should I say, it's basically how far away the particles won't render.
So if I set this to five, if I'm within five studs of where these particles are being emitted, I won't
I won't see the particles.
Like once the particles get further than five studs away from me, then I can start seeing them and
I can sit here and change how far away I want these particles to render on my screen.
And the reason they use this is for layering multiple particle emitters together so they don't look
weird.
What's the next one?
We already know what name and parent is emission direction.
So this is basically what direction you want the particles to emit.
Right now, that's set to the top, but I can emit from the left side of the part, so it's emitting
from the left side of the part, or maybe the right side, maybe the front.
That's just basically how this one works.
Very simple enabled enables or disables the particle emitter.
If I turn it off, they're no longer emits particles, turn it back on, it starts emitting particles.
Pretty simple.
Lifetime is how long you want your particles to live for.
So right now it's set from 5 to 10, which basically means these particles will live anywhere from a
minimum of 5 seconds to a maximum of 10 seconds.
So I can change this to maybe like one and three.
And you'll notice that my newly generated particles are living much shorter lifespans.
The rate how many particles I want to emit.
If I set it to 50, it's emitting more particles.
If I set it to 100 a ton more or I could set it to one, it's only emitting one particle a second.
But if I do ten, here's ten particles a second, 100 particles per second.
You get the idea rotation.
This sets a random rotation for the particle.
So.
If I set it to like 360, that means when these particles generate, they will be randomly rotated anywhere
from 0 to 360 degrees.
So as you can notice, these spikes coming off of these particles are no longer aligned anymore.
If I were to set it back to zero, you'll see all of them are perfectly pointing up.
But if I set it back to 360, all the particles will not orient themselves or randomly rotational speed.
Basically another random thing run out, set to zero.
But if I set it to like a max of ten now, these particles will rotate anywhere from 0 to 10 degrees
every second.
Speed how fast you want the particles to emit out of here.
So if I set it to like 20 now they're shooting out of here super fast.
And of course there's a minimum and a maximum, so you can randomize it.
Maybe you want something to come out at five and you want others to come at it blazing fast speeds.
Spread angle.
Another simple one.
Basically randomize how much of an.
How much of a spread you want the particles to emit from so like from the x and Y direction if you imagine
this as a 2D plane.
So I can set it to like 25, 25.
So these particles will now emit anywhere from zero to up to 25 degrees in a random direction.
And of course, I can do all the way up to like 90 degrees.
So you see some of them are going out horizontally.
The next one.
What else?
We got shape.
This one's kind of cool.
It lets you pick the shape of the emitter.
What does that mean?
So basically, right now it's set to box.
So you can imagine that the particle emitter is in here like a box shape and it's emitting particles
from the top.
But I continue to like sphere.
And now that means that this particle emitter.
Think of a big sphere in here and it's just shooting out particles in all directions and change it to
like a flat disk.
So now has just like a disk in there, or you can change it to like a cylinder.
So think of like a cylinder in here.
And you can change the shape and out, which basically lets you change.
If you want the particles to emit away from the shape which is outward, or if you want them to emit
towards the shape which is inward.
If I change the transparency here to point seven, you can see that these particles are emitting towards
the centre of the shape and flying out.
And if I set it to maybe something like in and out, it'll do a mix of both.
Some of them will emit inwards and some of them will emit outwards shape partial.
This is kind of a weird one, but basically kind of I'll put a little diagram up.
It basically changes the shape of the shape.
So like if I did 0.5, it kind of like tightens the top of a cone.
So again, it's a pretty weird property.
Shape Style is a simple one.
Basically, whether or not you want the particles to emit from the surface of the object.
So if I put this back to a box shape, you'll notice that these particles are only emitting from this
face.
But if I set it to volume now, they emit from anywhere within the volume of the shape.
That's just the difference between the two.
The flipbook flipbook layout, this property allows you to animate particles.
So what you would do is you would select a grid style and it allows you to fill it up with like different
sections of pictures that you can change between each one.
It's like animating.
Like if you ever seen a flipbook and you run your thumb through it and it looks like an animation,
that's basically what this does.
Acceleration.
Basically accelerate the particles in a particular global direction, like the global x axis is this
way.
So I could accelerate the particles in that direction by like maybe like we'll put five here and I'll
kind of looks like there's a little bit of wind in my game.
Just a little bit of wind and maybe I can do ten.
And now we kind of got like a hurricane.
Or you can do 100.
Yeah.
Pretty simple.
Maybe we'll do 100 in the Y direction.
Super fast.
Super crazy.
That's just acceleration right there.
Next section, drag.
Now, this one's kind of cool.
This basically determines the rate at which the particles will lose their speed.
So if I put this at, like, five, you'll notice that over time, the particles are losing half of
their speed.
So lose half, lose half, lose half, lose half, lose half until it basically stops.
Lock two.
This one's kind of interesting.
So if you notice, if I move my particle emitter around.
See, the particles are free to move wherever they like.
But if I do locked apart now, if I move my part around, they are locked to the part.
There is no free movement for the particles anymore.
Next is time scale.
This one's pretty simple.
Set it at one, which is normal time, but I could set it to like 0.5, which is half of our current
time set all the way down to like 0.1.
And now they're moving in slow motion.
But we'll just leave it at one very simple.
And then the last property is velocity inheritance.
This one's a little weird.
I'm not exactly sure how it works.
The wiki states that this inherits the velocity of the base part, so basically the part that this particle
emitter is parented to.
If this is an unanchored part and it's moving around, it has a velocity, it will inherit that velocity
in some way.
But it says that it uses the dot velocity property of a part which is deprecated.
We no longer use dot velocity, instead we use assembly linear velocity.
And I was messing around trying to see if this works and I couldn't get it to work so I wouldn't worry
about this property for now.
So there's your overview of particle emitters.
All these properties with numbers you can animate them like the transparency.
Like maybe I want to fade out over time.
Check that out.
So yeah, very cool.
Particle emitters.